/*
 * Camera.h
 *
 *  Created on: 04.06.2011
 *      Author: Kirill
 */

#ifndef CAMERA_H_
#define CAMERA_H_

#include "Headers.h"

using namespace glm;

class CGameCamera
{
private:
	vec3 eye;
	vec3 center;
	vec3 up;
	mat4 viewMatrix;
protected:
	vec3 RotateAroundPoint( vec3 Obj, vec3 Point, const float angelX, const float angelY, const float angelZ  );
public:
	CGameCamera();
	CGameCamera( vec3 Eye, vec3 Center, vec3 Up ) : eye(Eye), center(Center), up(Up)
				{ viewMatrix = glm::lookAt( eye, center, up ); };
	~CGameCamera(){};

	mat4 GetViewMatrix(){ return viewMatrix; }
	void Translate( const float dx, const float dy, const float dz );
	void RotateEyeAroundCenter( const float angelX, const float angelY, const float angelZ );
	void RotateCenterAroundEye( const float angelX, const float angelY, const float angelZ );
};

#endif /* CAMERA_H_ */
